<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script type="text/javascript" src="./template.js"></script>
    <script type="text/javascript">
        var template =
                'My skills:' +
                        '<%if(this.showSkills) {%>' +
                        '<%for(var index in this.skills) {%>' +
                        '<a href="#"><%this.skills[index]%></a>' +
                        '<%}%>' +
                        '<%} else {%>' +
                        '<p>none</p>' +
                        '<%}%>';
        console.log(TemplateEngine(template, {
            skills: ["js", "html", "css"],
            showSkills: true
        }));
    </script>
    <title></title>
</head>
<body>
       15行的模版引擎（看console）
</body>
</html>